﻿using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xproject.Framework.Core;
using Xproject.Framework.Core.DataContext;
using Xproject.Framework.Core.Repositories;
using Model.WeiXin;
using Repository.WeiXinProject;
using Xproject.Util;

namespace Services.WeiXinProject
{
   public  class WeiXinConfigServices : Service
    {             
        IRepositoryAsync<WeiXinConfig> m_WeiXinConfigRepository;

        public WeiXinConfigServices(IDataContextAsync dataContext) : base(dataContext)
        {
            m_WeiXinConfigRepository = m_UnitOfWork.RepositoryAsync<WeiXinConfig>();
        }
        /// <summary>
        /// 取单个
        /// </summary>
        /// <param name="configId"></param>
        /// <returns></returns>
        public WeiXinConfig GetWeiXinConfig(string configId)
        {
            return m_WeiXinConfigRepository.Get(configId);
        }
        /// <summary>
        /// 取所有
        /// </summary>
        /// <returns></returns>
        public List<WeiXinConfig> GetAllWeiXinConfig()
        {
            return m_WeiXinConfigRepository.GetAll();
        }
    }
}
